<template>
	<view>
		<navigation title="订单详情"></navigation>
		<view class="infoBox">
			<uni-collapse accordion="true">
			 
			    <uni-collapse-item title="合同详情" class="title" v-if="order.json" :rightTitle="order.edit===1?'修改':''"  @rightFn="editTextFn({api:order.api,read:order.read,id:order.json.id,type:'order',picker:order.picker})">
			        <view class="info_box">
			            <view class="con">
			    			<text class="txt1">签约公司</text>
			    			<text class="txt2">{{order.json.company_id}}</text>
			    		</view>
			    		<view class="con">
			    			<text class="txt1">订单类型</text>
			    			<text class="txt2">{{order.json.news_type}}</text>
			    		</view>
			    		<view class="con">
			    			<text class="txt1">合同编号</text>
			    			<text class="txt2">{{order.json.contract_no}}</text>
			    		</view>
			    		<view class="con">
			    			<text class="txt1">签约日期</text>
			    			<text class="txt2">{{order.json.sign_date}}</text>
			    		</view>
						<view class="con">
							<text class="txt1">举办日期</text>
							<text class="txt2">{{order.json.event_date}}</text>
						</view>
						<view class="con">
							<text class="txt1">酒店名称</text>
							<text class="txt2">{{order.json.hotel_text}}</text>
						</view>
						<view class="con">
							<text class="txt1">合作模式</text>
							<text class="txt2">{{order.json.cooperation_mode}}</text>
						</view>
						<view class="con">
							<text class="txt1">积分</text>
							<text class="txt2">{{order.json.score}}</text>
						</view>
						<view class="con">
							<text class="txt1">宴会厅</text>
							<text class="txt2">{{order.json.banquet_hall_name}}</text>
						</view>
						<view class="con">
							<text class="txt1">引流销售</text>
							<text class="txt2">{{order.json.recommend_salesman}}</text>
						</view>
						<view class="con">
							<text class="txt1">签约销售</text>
							<text class="txt2">{{order.json.salesman}}</text>
						</view>
			    		<view class="remark">
			    			<text class="txt1">备注</text>
			    			<text class="txt2">{{order.json.remark}}</text>
			    		</view>
			        </view>
				     
					 <view v-if="JSON.stringify(order.json.image) !='[]'">
						 <view style="padding-left: 30upx;font-size: 28upx;">
						 	合同照片
						 </view>
						<view class="image_list" >
							<image :src="item" mode="" v-for="(item,index) in  order.json.image" :key="index" @click="previewImg({list:order.json.image,index:index})"></image>
						</view>					 	
					 </view>
					 <view v-if="JSON.stringify(order.json.note_img) !='[]'">
					 	<view style="padding-left: 30upx;font-size: 28upx;">
					 		收据照片
					 	</view>
						<view class="image_list" >
							<image :src="item" mode="" v-for="(item,index) in  order.json.note_img" :key="index" @click="previewImg({list:order.json.note_img,index:index})"></image>
						</view> 
					 </view>
					<view v-if="JSON.stringify(order.json.receipt_img) !='[]'">
						<view style="padding-left: 30upx;font-size: 28upx;">
							小票或收款截图照片
						</view>
						<view class="image_list" >
							<image :src="item" mode="" v-for="(item,index) in  order.json.receipt_img" :key="index" @click="previewImg({list:order.json.receipt_img,index:index})"></image>
						</view>
					</view>
					
			    </uni-collapse-item>
				
			    <uni-collapse-item title="酒店服务项目" class="title" v-if="JSON.stringify(hotelItem.json)==='[]'?false:JSON.stringify(hotelItem.json)==='{}'?false:true" :rightTitle="hotelItem.edit===1?'修改':''" @rightFn="editTextFn({api:hotelItem.api,read:hotelItem.read,id:hotelItem.json.id,type:'hotelItem',picker:hotelItem.picker})">
			        <view class="info_box">
			            <view class="con">
			    			<text class="txt1">婚房数量</text>
			    			<text class="txt2">{{hotelItem.json.wedding_room_amount}}</text>
			    		</view>
			    		<view class="con">
			    			<text class="txt1">婚房价格</text>
			    			<text class="txt2">{{hotelItem.json.wedding_room}}</text>
			    		</view>
			    		<view class="con">
			    			<text class="txt1">停车位数量</text>
			    			<text class="txt2">{{hotelItem.json.part_amount}}</text>
			    		</view>
			    		<view class="con">
			    			<text class="txt1">停车位价格</text>
			    			<text class="txt2">{{hotelItem.json.part}}</text>
			    		</view>
			    		<view class="con">
			    			<text class="txt1">香槟数量</text>
			    			<text class="txt2">{{hotelItem.json.champagne_amount}}</text>
			    		</view>
						<view class="con">
							<text class="txt1">香槟价格</text>
							<text class="txt2">{{hotelItem.json.champagne}}</text>
						</view>
						<view class="con">
							<text class="txt1">茶歇数量</text>
							<text class="txt2">{{hotelItem.json.tea_amount}}</text>
						</view>
						<view class="con">
							<text class="txt1">茶歇价格</text>
							<text class="txt2">{{hotelItem.json.tea}}</text>
						</view>
						<view class="con">
							<text class="txt1">糕点数量</text>
							<text class="txt2">{{hotelItem.json.cake_amount}}</text>
						</view>
						<view class="con">
							<text class="txt1">糕点价格</text>
							<text class="txt2">{{hotelItem.json.cake}}</text>
						</view>
			        </view>
			    </uni-collapse-item>
				<uni-collapse-item title="婚宴" class="title" v-if="banquet.json" :rightTitle="banquet.edit===1?'修改':''" 
				@rightFn="editTextFn({api:banquet.api,read:banquet.read,id:banquet.json.id,type:'banquet',picker:banquet.picker})">
				    <view class="info_box">
				        <view class="con">
							<text class="txt1">订单所属公司</text>
							<text class="txt2">{{banquet.json.company_id}}</text>
						</view>
						<view class="con">
							<text class="txt1">婚宴总金额</text>
							<text class="txt2">{{banquet.json.banquet_totals}}</text>
						</view>
						<view class="con">
							<text class="txt1">桌数</text>
							<text class="txt2">{{banquet.json.table_amount}}</text>
						</view>
						<view class="con">
							<text class="txt1">餐标</text>
							<text class="txt2">{{banquet.json.table_price}}</text>
						</view>
						<view class="con">
							<text class="txt1">服务费总计</text>
							<text class="txt2">{{banquet.json.service_fee}}</text>
						</view>
						<view class="con">
							<text class="txt1">酒水费用</text>
							<text class="txt2">{{banquet.json.wine_fee}}</text>
						</view>
						<view class="con">
							<text class="txt1">加菜换菜</text>
							<text class="txt2">{{banquet.json.banquet_update_table}}</text>
						</view>
						<view class="con">
							<text class="txt1">仪式</text>
							<text class="txt2">{{banquet.json.banquet_ritual_title}}</text>
						</view>
						<view class="con">
							<text class="txt1">仪式价格</text>
							<text class="txt2">{{banquet.json.banquet_ritual_hall}}</text>
						</view>
						<view class="con">
							<text class="txt1">其他</text>
							<text class="txt2">{{banquet.json.banquet_other}}</text>
						</view>
						<view class="con">
							<text class="txt1">备注</text>
							<text class="txt2">{{banquet.json.banquet_remark}}</text>
						</view>
				    </view>
				</uni-collapse-item>
				<uni-collapse-item title="婚庆" class="title" v-if="wedding.json" :rightTitle="wedding.edit===1?'修改':''" 
				@rightFn="editTextFn({api:wedding.api,read:wedding.read,id:wedding.json.id,type:'wedding',picker:wedding.picker})">
				    <view class="info_box">
				        <view class="con">
							<text class="txt1">订单所属公司</text>
							<text class="txt2">{{wedding.json.company_id}}</text>
						</view>
						<view class="con">
							<text class="txt1">婚庆总金额</text>
							<text class="txt2">{{wedding.json.wedding_total}}</text>
						</view>
						<view class="con">
							<text class="txt1">套餐</text>
							<text class="txt2">{{wedding.json.wedding_package_title}}</text>
						</view>
						<view class="con">
							<text class="txt1">婚庆套餐价</text>
							<text class="txt2">{{wedding.json.wedding_package_price}}</text>
						</view>
						<view class="con">
							<text class="txt1">仪式价格</text>
							<text class="txt2">{{wedding.json.wedding_ritual_hall}}</text>
						</view>
						<view class="con">
							<text class="txt1">其他</text>
							<text class="txt2">{{wedding.json.wedding_other}}</text>
						</view>
						<view class="con">
							<text class="txt1">仪式</text>
							<text class="txt2">{{wedding.json.wedding_ritual_title}}</text>
						</view>
						<view class="con">
							<text class="txt1">是否研发产品</text>
							<text class="txt2">{{wedding.json.is_new_product===1?'是':'否'}}</text>
						</view>
						<view class="con">
							<text class="txt1">研发产品编号</text>
							<text class="txt2">{{wedding.json.new_product_no}}</text>
						</view>
						<view class="con">
							<text class="txt1">备注</text>
							<text class="txt2">{{wedding.json.wedding_remark}}</text>
						</view>
				    </view>
				</uni-collapse-item>
				
				 <uni-collapse-item title="婚车" class="title " v-if="JSON.stringify(carList.array) !='[]'"  >
					<view class="wine" v-for="(item,index) in carList.array" :key="index"   >
						<view class="info_box">
							<view class="name">
							   <view class="name">婚车({{index+1}})  </view>
							   <view class="edit" style="width: 100upx;text-align: right;" v-if="item.edit===1" @click="editTextFn({api:carList.api,read:carList.read,id:item.id,type:'carList',picker:carList.picker})">修改</view>
							</view>
							
							<view class="con">
								<text class="txt1">是否主车</text>
								<text class="txt2">{{item.is_master}}</text>
							</view>
						    <view class="con">
								<text class="txt1">婚车品牌</text>
								<text class="txt2">{{item.car_id}}</text>
							</view>
					
							<view class="con">
								<text class="txt1">婚车数量</text>
								<text class="txt2">{{item.car_amount}}</text>
							</view>
							
							<view class="con">
								<text class="txt1">婚车价格</text>
								<text class="txt2">{{item.car_price}}</text>
							</view>
							
							<view class="remark">
								<text class="txt1">备注</text>
								<text class="txt2">{{item.car_remark}}</text>
							</view>
						</view>
					</view>
				</uni-collapse-item>
				
				 <uni-collapse-item title="酒水" class="title " v-if=" JSON.stringify(wineList.array) !='[]'" >
					<view class="wine" v-for="(item,index) in wineList.array" :key="index">
						<view class="info_box">
							<view class="name">
								<view class="name">酒水({{index+1}})</view>
							    <view class="edit" style="width: 100upx;text-align: right;" v-if="item.edit===1" @click="editTextFn({api:wineList.api,read:wineList.read,id:item.id,type:'wineList',picker:wineList.picker})">修改</view>
							</view>
						    <view class="con">
								<text class="txt1">酒水品牌</text>
								<text class="txt2">{{item.wine_id}}</text>
							</view>
					
							<view class="con">
								<text class="txt1">酒水数量</text>
								<text class="txt2">{{item.wine_amount}}</text>
							</view>
							
							<view class="con">
								<text class="txt1">酒水价格</text>
								<text class="txt2">{{item.wine_price}}</text>
							</view>
							
							<view class="remark">
								<text class="txt1">备注</text>
								<text class="txt2">{{item.wine_remark}}</text>
							</view>
						</view>
					</view>
				</uni-collapse-item>
				
				 <uni-collapse-item title="喜糖" class="title " v-if=" JSON.stringify(sugarList.array) !='[]'" > 
					<view class="suger" v-for="(item,index) in  sugarList.array" :key="index">
						<view class="info_box">
							<view class="name">
								<view class="name">喜糖({{index+1}})</view>
								<view class="edit" style="width: 100upx;text-align: right;" v-if="item.edit===1" @click="editTextFn({api:sugarList.api,read:sugarList.read,id:item.id,type:'sugarList',picker:sugarList.picker})">修改</view>
							</view>													
						    <view class="con">
								<text class="txt1">喜糖品牌</text>
								<text class="txt2">{{item.sugar_id}}</text>
							</view>
	
							<view class="con">
								<text class="txt1">喜糖数量</text>
								<text class="txt2">{{item.sugar_amount}}</text>
							</view>
							
							<view class="con">
								<text class="txt1">喜糖价格</text> 
								<text class="txt2">{{item.sugar_price}}</text>
							</view>
							
							<view class="remark">
								<text class="txt1">备注</text>
								<text class="txt2">{{item.sugar_remark}}</text>
							</view>
						</view>
					</view>
				</uni-collapse-item>
				
				 <uni-collapse-item title="糕点" class="title dessert" v-if=" JSON.stringify(dessertList.array) !='[]'" >
					<view class="dessert" v-for="(item,index) in dessertList.array" :key='index'  >
						<view class="info_box">
							<view class="name">
								<view class="name">糕点({{index}})</view>
								<view class="edit" style="width: 100upx;text-align: right;" v-if="item.edit===1" @click="editTextFn({api:dessertList.api,read:dessertList.read,id:item.id,type:'dessertList',picker:dessertList.picker})">修改</view>
							</view>
						    <view class="con">
								<text class="txt1">糕点品牌</text>
								<text class="txt2">{{item.dessert_id}}</text>
							</view>
					
							<view class="con">
								<text class="txt1">糕点数量</text>
								<text class="txt2">{{item.dessert_amount}}</text>
							</view>
							
							<view class="con">
								<text class="txt1">糕点价格</text>
								<text class="txt2">{{item.dessert_price}}</text>
							</view>
							
							<view class="remark">
								<text class="txt1">备注</text>
								<text class="txt2">{{item.dessert_remark}}</text>
							</view>
						</view>
					</view>
				</uni-collapse-item>
				
				<uni-collapse-item title="灯光" class="title light"  v-if=" JSON.stringify(lightList.array) !='[]'"  >
					<view class="light" v-for="(item,index) in lightList.array" :key='index' >
						<view class="info_box">
							<view class="name">
								<view class="name">灯光({{index+1}})</view>
							    <view class="edit" style="width: 100upx;text-align: right;" v-if="item.edit===1" @click="editTextFn({api:lightList.api,read:lightList.read,id:item.id,type:'lightList',picker:lightList.picker})">修改</view>
							</view>
						    <view class="con">
								<text class="txt1">灯光品牌</text>
								<text class="txt2">{{item.light_id}}</text>
							</view>
					
							<view class="con">
								<text class="txt1">灯光数量</text>
								<text class="txt2">{{item.light_amount}}</text>
							</view>
							
							<view class="con">
								<text class="txt1">灯光价格</text>
								<text class="txt2">{{item.light_price}}</text>
							</view>
							
							<view class="remark">
								<text class="txt1">备注</text>
								<text class="txt2">{{item.light_remark}}</text>
							</view>
						</view>
					</view>
				</uni-collapse-item>
				
				<uni-collapse-item title="Led" class="title led" v-if="JSON.stringify(ledList.array) !='[]'" >
					<view class="led" v-for="(item,index) in ledList.array" :key="index">
						<view class="info_box">
							<view class="name">
								<view class="name">Led({{index+1}})</view>
								<view class="edit" style="width: 100upx;text-align: right;" v-if="item.edit===1" @click="editTextFn({api:ledList.api,read:ledList.read,id:item.id,type:'ledList',picker:ledList.picker})">修改</view>
							</view>
						    <view class="con">
								<text class="txt1">Led品牌</text>
								<text class="txt2">{{item.led_id}}</text>
							</view>
					
							<view class="con">
								<text class="txt1">Led数量</text>
								<text class="txt2">{{item.led_amount}}</text>
							</view>
							
							<view class="con">
								<text class="txt1">Led价格</text>
								<text class="txt2">{{item.led_price}}</text>
							</view>
							
							<view class="remark">
								<text class="txt1">备注</text>
								<text class="txt2">{{item.led_remark}}</text>
							</view>
						</view>
					</view>
				</uni-collapse-item>
				
				<uni-collapse-item title="3D" class="title " v-if=" JSON.stringify(d3List.array) !='[]'" >
					<view class="d3" v-for="(item,index) in d3List.array" :key="index">
						<view class="info_box">
							<view class="name">
								<view class="name">3D({{index+1}})</view>
								<view class="edit" style="width: 100upx;text-align: right;" v-if="item.edit===1" @click="editTextFn({api:d3List.api,read:d3List.read,id:item.id,type:'d3List',picker:d3List.picker})">修改</view>
							</view>
						    <view class="con">
								<text class="txt1">3D品牌</text>
								<text class="txt2">{{item.d3_id}}</text>
							</view>
					
							<view class="con">
								<text class="txt1">3D数量</text>
								<text class="txt2">{{item.d3_amount}}</text>
							</view>
							
							<view class="con">
								<text class="txt1">3D价格</text>
								<text class="txt2">{{item.d3_price}}</text>
							</view>
							
							<view class="remark">
								<text class="txt1">备注</text>
								<text class="txt2">{{item.d3_remark}}</text>
							</view>
						</view>
					</view>
				</uni-collapse-item>
		
			
			<uni-collapse-item title="合同总金额" class="title " v-if="contractPrice.json" :rightTitle="contractPrice.edit===1?'修改':''"  @rightFn="editTextFn({api:contractPrice.api,read:contractPrice.read,id:contractPrice.json.id,type:'contractPrice',picker:contractPrice.picker})">
				<view class="d3"  >
					<view class="info_box">
						<view class="name">
							<view class="name">合同总金额</view>		
							<text class="txt2">{{contractPrice.json.totals}}</text>
						</view>
						<view class="con" >
							<text class="txt1">定金收款时间</text>
							<text class="txt2">{{contractPrice.json.earnest_money_date}}</text>
						</view>					
						<view class="con" >
							<text class="txt1">定金收款金额</text>
							<text class="txt2">{{contractPrice.json.earnest_money}}</text>
						</view>							
						<view class="con" >
							<text class="txt1">中款收款时间</text>
							<text class="txt2">{{contractPrice.json.middle_money_date}}</text>
						</view>							
						<view class="con" >
							<text class="txt1">中款收款金额</text>
							<text class="txt2">{{contractPrice.json.middle_money}}</text>
						</view>
						<view class="con" >
							<text class="txt1">中款尾款时间</text>
							<text class="txt2">{{contractPrice.json.tail_money_date}}</text>
						</view>
						<view class="con" >
							<text class="txt1">中款尾款金额</text>
							<text class="txt2">{{contractPrice.json.tail_money}}</text>
						</view>
					</view>
				</view>
			</uni-collapse-item>
				
			<uni-collapse-item title="收款信息" class="title " v-if="JSON.stringify(incomeList.array) !='[]'" >
				<view class="d3" v-for="(item,index) in incomeList.array" :key="index">
					<view class="info_box">
						<view class="name">
							<view class="name">收款信息({{index+1}})</view>
							<view class="edit" style="width: 100upx;text-align: right;" v-if="item.edit===1" @click="editTextFn({api:incomeList.api,read:incomeList.read,id:item.id,type:'incomeList',picker:incomeList.picker,income_category:item.income_category})">修改</view>
						</view> 
						<view class="name">
							<view class="name">收据编号</view>
							<text class="txt2">{{item.receivable_no}}</text>
						</view> 
						<view class="con">
							<text class="txt1">收款类目</text>
							<text class="txt2">{{item.income_category}}</text>
						</view>					
						<view class="con">
							<text class="txt1">收款方式</text>
							<text class="txt2">{{item.income_payment}}</text>
						</view>							
						<view class="con">
							<text class="txt1">收款性质</text>
							<text class="txt2">{{item.income_type}}</text>
						</view>							
						<view class="con">
							<text class="txt1">收款金额</text>
							<text class="txt2">{{item.income_item_price}}</text>
						</view>					
						<view class="con">
							<text class="txt1">收款时间</text>
							<text class="txt2">{{item.income_date}}</text>
						</view>
						<view class="con">
							<text class="txt1">实际收款时间</text>
							<text class="txt2">{{item.income_real_date}}</text>
						</view>
						<view class="con">
							<text class="txt1">收款备注</text>
							<text class="txt2">{{item.income_remark}}</text>
						</view>
					</view>						
					<view v-if="JSON.stringify(item.note_img) !='[]'">
					 	<view style="padding-left: 30upx;font-size: 28upx;">
					 		收据照片
					 	</view>
						<view class="image_list" >
							<image :src="items" mode="" v-for="(items,indexs) in  item.note_img" :key="indexs" @click="previewImg({list:item.note_img,index:indexs})"></image>
						</view> 
					 </view>
					<view v-if="JSON.stringify(item.receipt_img) !='[]'">
						<view style="padding-left: 30upx;font-size: 28upx;">
							小票或收款截图照片
						</view>
						<view class="image_list" >
							<image :src="items" mode="" v-for="(items,indexs) in  item.receipt_img" :key="indexs" @click="previewImg({list:item.receipt_img,index:indexs})"></image>
						</view>
					</view>				
				</view>
			</uni-collapse-item>
				<uni-collapse-item title="付款信息" class="title " v-if="JSON.stringify(paymentList.array) !='[]'" >
					<view class="d3" v-for="(item,index) in paymentList.array" :key="index">
						<view class="info_box">
							<view class="name">
								<view class="name">付款信息({{index+1}})</view>
								<view class="edit" style="width: 100upx;text-align: right;" v-if="item.edit===1" @click="editTextFn({api:paymentList.api,read:paymentList.read,id:item.id,type:'paymentList',picker:paymentList.picker,income_category:item.pay_category})">修改</view>
							</view>
							<view class="con">
								<text class="txt1">付款编号</text>
								<text class="txt2">{{item.payment_no}}</text>
							</view>		
							<view class="con">
								<text class="txt1">付款类目</text>
								<text class="txt2">{{item.pay_category}}</text>
							</view>					
							<view class="con">
								<text class="txt1">付款性质</text>
								<text class="txt2">{{item.pay_type}}</text>
							</view>							
							<view class="con">
								<text class="txt1">付款申请日期</text>
								<text class="txt2">{{item.apply_pay_date}}</text>
							</view>							
							<view class="con">
								<text class="txt1">实际付款日期</text>
								<text class="txt2">{{item.pay_real_date}}</text>
							</view>
							<view class="con">
								<text class="txt1">付款金额</text>
								<text class="txt2">{{item.pay_item_price}}</text>
							</view>
							<view class="con">
								<text class="txt1">付款备注</text>
								<text class="txt2">{{item.payment_remark}}</text>
							</view>
						</view>
						<view v-if="JSON.stringify(item.note_img) !='[]'">
							<view style="padding-left: 30upx;font-size: 28upx;">
								收据照片
							</view>
							<view class="image_list" >
								<image :src="items" mode="" v-for="(items,indexs) in  item.note_img" :key="indexs" @click="previewImg({list:item.note_img,index:indexs})"></image>
							</view> 
						 </view>
						<view v-if="JSON.stringify(item.receipt_img) !='[]'">
							<view style="padding-left: 30upx;font-size: 28upx;">
								小票或收款截图照片
							</view>
							<view class="image_list" >
								<image :src="items" mode="" v-for="(items,indexs) in  item.receipt_img" :key="indexs" @click="previewImg({list:item.receipt_img,index:indexs})"></image>
							</view>
						</view>		
					</view>
				</uni-collapse-item>
					
				<uni-collapse-item title="婚宴增项" class="title " v-if="JSON.stringify(banquetSuborderList.array) !='[]'" >
					<view class="d3" v-for="(item,index) in banquetSuborderList.array" :key="index">
						<view class="info_box">
							<view class="name">
								<view class="name">婚宴增项({{index+1}})</view>
								<view class="edit" style="width: 100upx;text-align: right;" v-if="item.edit===1" @click="editTextFn({api:banquetSuborderList.api,read:banquetSuborderList.read,id:item.id,type:'banquetSuborderList',picker:banquetSuborderList.picker,income_category:item.pay_category})">修改</view>
							</view>
							<view class="con">
								<text class="txt1">桌数</text>
								<text class="txt2">{{item.table_amount}}</text>
							</view>					
							<view class="con">
								<text class="txt1">餐标</text>
								<text class="txt2">{{item.table_price}}</text>
							</view>							
							<view class="con">
								<text class="txt1">增项小计</text>
								<text class="txt2">{{item.banquet_totals}}</text>
							</view>							
							<view class="con">
								<text class="txt1">签单销售</text>
								<text class="txt2">{{item.sub_banquet_remark}}</text>
							</view>
							<view class="con">
								<text class="txt1">备注</text>
								<text class="txt2">{{item.sub_banquet_remark}}</text>
							</view>
							
						</view>
						
						<view v-if="JSON.stringify(item.image) !='[]'">
							<view style="padding-left: 30upx;font-size: 28upx;">
								收据照片
							</view>
							<view class="image_list" >
								<image :src="items" mode="" v-for="(items,indexs) in  item.image" :key="indexs" @click="previewImg({list:item.image,index:indexs})"></image>
							</view> 
						 </view>
						<view v-if="JSON.stringify(item.note_img) !='[]'">
							<view style="padding-left: 30upx;font-size: 28upx;">
								收据照片
							</view>
							<view class="image_list" >
								<image :src="items" mode="" v-for="(items,indexs) in  item.note_img" :key="indexs" @click="previewImg({list:item.note_img,index:indexs})"></image>
							</view> 
						 </view>
						<view v-if="JSON.stringify(item.receipt_img) !='[]'">
							<view style="padding-left: 30upx;font-size: 28upx;">
								小票或收款截图照片
							</view>
							<view class="image_list" >
								<image :src="items" mode="" v-for="(items,indexs) in  item.receipt_img" :key="indexs" @click="previewImg({list:item.receipt_img,index:indexs})"></image>
							</view>
						</view>		
					</view>
				</uni-collapse-item>
				
				<uni-collapse-item title="婚庆增项" class="title " v-if="JSON.stringify(weddingSuborderList.array) !='[]'" > 
					<view class="d3" v-for="(item,index) in weddingSuborderList.array" :key="index"  >
						<view class="info_box">
							<view class="name">
								<view class="name">婚庆增项({{index+1}})</view>
								<view class="edit" style="width: 100upx;text-align: right;" v-if="item.edit===1" @click="editTextFn({api:weddingSuborderList.api,read:weddingSuborderList.read,id:item.id,type:'weddingSuborderList',picker:weddingSuborderList.picker,income_category:item.pay_category})">修改</view>
							</view>
							<view class="con">
								<text class="txt1">订单号</text>
								<text class="txt2">{{item.wedding_order_no}}</text>
							</view>					
							<view class="con">
								<text class="txt1">增项小计</text>
								<text class="txt2">{{item.wedding_totals}}</text>
							</view>							
							<view class="con">
								<text class="txt1">签单销售</text>
								<text class="txt2"></text>
							</view>															
							<view class="con">
								<text class="txt1">备注</text>
								<text class="txt2">{{item.sub_wedding_remark}}</text>
							</view>								
						</view>
						<view v-if="JSON.stringify(item.image) !='[]'">
							<view style="padding-left: 30upx;font-size: 28upx;">
								收据照片
							</view>
							<view class="image_list" >
								<image :src="items" mode="" v-for="(items,indexs) in  item.image" :key="indexs" @click="previewImg({list:item.image,index:indexs})"></image>
							</view> 
						 </view>
						<view v-if="JSON.stringify(item.note_img) !='[]'">
							<view style="padding-left: 30upx;font-size: 28upx;">
								收据照片
							</view>
							<view class="image_list" >
								<image :src="items" mode="" v-for="(items,indexs) in  item.note_img" :key="indexs" @click="previewImg({list:item.note_img,index:indexs})"></image>
							</view> 
						 </view>
						<view v-if="JSON.stringify(item.receipt_img) !='[]'">
							<view style="padding-left: 30upx;font-size: 28upx;">
								小票或收款截图照片
							</view>
							<view class="image_list" >
								<image :src="items" mode="" v-for="(items,indexs) in  item.receipt_img" :key="indexs" @click="previewImg({list:item.receipt_img,index:indexs})"></image>
							</view>
						</view>		
					</view>
				</uni-collapse-item>
			</uni-collapse> 
		</view>
		
		<view class="add2pin" v-if="addItems.edit"  @click="showTwoPicker_linkage">			
			<!-- <picker mode="multiSelector" @change="addItemschang" @columnchange="addItemsColumn" :value="addItemsIndex" range-key="title" :range="addItemsArray"> -->
				<view >添加项目</view>
			<!-- </picker> -->
		</view>
		<wzp-picker ref="wzpPicker" :mode="mode" :pickerList="pickerList" :defaultIndex="defaultIndex"  @onConfirm="onConfirm"></wzp-picker>
		<!-- 审批流程 -->
		<view class="line"></view>
		<view class="approval" v-if="confirmList.length>1">
			<text>审批流程</text>
			 <view class="approver">
				 <view class="box" v-for="(item,index) in confirmList" :key="index">
					 <view :class="index===0?'frist_circle':'circle'"></view>
					 <view class="left">
						 {{item.title}}
						 <view class="view_text">
						       {{item.status}}
						 </view>
						 <view class="view_text">
						       {{item.content}}						 							  							
						 </view>						 
					 </view>
					 <view class="right" v-for="(items,indexs) in item.managerList" :key="indexs">
						 <view class="image">
						    <image style="width: 100%;border-radius: 50%;" :src="items.avatar" mode="widthFix"></image>						 	
						 </view>
						 <text>{{items.realname}}</text>
					 </view>	
				 </view>
												 				
			 </view>
		</view>
		<!-- 审批流程结束 -->
		<!-- <button type="default" class="btn" @click="submit()"> 提交审核</button> -->
		
	</view>
</template>

<script>
	import wzpPicker from "@/component/wzp-picker/wzpPicker.vue";
	import navigation from "@/component/navigation.vue"
	import uniCollapse from '@/components/uni-collapse/uni-collapse.vue'
	import uniCollapseItem from '@/components/uni-collapse-item/uni-collapse-item.vue'
	import sun from '@/utils/sun.js'
	export default {
		components: {
			navigation,
			uniCollapse,
			uniCollapseItem,
			wzpPicker
		},
		data() {
			return {
				options:'',
				member:"",//客人信息
				order:{
					api:'',
					edit:'',
					id:'',
					json:{
						image:[],
						note_img:[],
						receipt_img:[],
					},
					picker:'',
					read:''
				},//合同详情
				wedding:'',//婚庆
				banquet:'',//婚宴
				hotelItem:{
					json:{
						wedding_room_amount:'',
					}
				},//酒店详情
				sugarList:'',//喜糖
				carList:'',//婚车
				wineList:'',//酒水				
				dessertList:'',//糕点
				lightList:'',//灯光
				ledList:'',//Led
				d3List:'',//3d
				addItems:'',//是否增项
				
				contractPrice:'',//
				incomeList:'',
				paymentList:'',
				weddingSuborderList:'',
				banquetSuborderList:'',
				
				confirmList:'',//审核流程
				isEdit:'',//是否可以编辑
				options:'',
				
				addItemsArray:[[],[]],//添加项目选择
				addItemsIndex:[0,0],//
				
				pickerValue: "",
				mode: "",
				pickerList: [],
				defaultIndex: []
			}
		},
		onLoad(options) {
			this.options =options;
			   
		},
		onShow() {
			this.addItemsArray=[[],[]]
			this.getData({id:this.options.id})
			this.flowData({id:this.options.id})//流程
			
		},
		methods: {
			// 双列联动初始化
			showTwoPicker_linkage() {
				this.mode = 'two_linkage';
				this.pickerList = this.addItemsArray;
				this.defaultIndex = [0, 0];
				this.$refs.wzpPicker.showPicker();
			},
			onConfirm(e) {
			if(!this.pickerList[e[0]].children[e[1]]){
				this.pickerValue = this.pickerList[e[0]].title
			}else{
				this.pickerValue = this.pickerList[e[0]].title + " " + this.pickerList[e[0]].children[e[1]].title;
			}
			let one=e[0];
			let two=e[1];				
							
			if(this.addItemsArray[one].children[two]){
				this.addItemsArray[one].children[two].order_id=this.options.id
			   uni.navigateTo({
			   	url:"/pages/orderEdit/addOrder/addOrder?type="+JSON.stringify(this.addItemsArray[one].children[two])
			   })
			   return
			}
			if(this.addItemsArray[one]){
				this.addItemsArray[one].order_id=this.options.id
				uni.navigateTo({
					url:"/pages/orderEdit/addOrder/addOrder?type="+JSON.stringify(this.addItemsArray[one])
				})	
				return
			}
			
			
			},
			onBackPress() {
				if (this.$refs.wzpPicker.pickerShow) {
					this.$refs.wzpPicker.closePicker();
					return true;
				}
			},
			getData(e){				
			  let that=this										
			  sun.request({
				url: "/h5/order.order/detail",
				showLoading: true,
				token:true,
				data:{
					id:e.id
				},
				success(res) {				
					if(res.code==200){						
					that.order= res.data.order;
					that.wedding=res.data.wedding,//婚庆
				    that.banquet=res.data.banquet,//婚宴
					that.member= res.data.member;
					that.hotelItem = res.data.hotelItem;
					that.sugarList = res.data.sugarList;
					that.carList = res.data.carList;
					that.wineList = res.data.wineList;
                    that.sugarList = res.data.sugarList;
					that.dessertList = res.data.dessertList;
					that.lightList = res.data.lightList;
					that.ledList = res.data.ledList;
					that.d3List = res.data.d3List;
					that.contractPrice = res.data.contractPrice;//
					that.incomeList = res.data.incomeList;//,
					that.paymentList = res.data.paymentList;//,
					that.addItems = res.data.addItems;
					that.addItemsArray=res.data.addItems.addItems;
					
					// if(that.addItems.addItems.length>=1){
					// 	that.addItems.addItems.map((item,index)=>{
					// 		that.addItemsArray[0].push(item.title)
					// 		if(item.items){
					// 	       item.items.map((itemd,index)=>{
					// 		      that.addItemsArray[1].push(itemd.title)	   
					// 		   })		
					// 		}
					// 	})
					// }
					that.weddingSuborderList=res.data.weddingSuborderList;
					that.banquetSuborderList=res.data.banquetSuborderList;
					
				 }
				},
				fail(e) {
					uni.showToast({
						icon: "none",
						title: "服务器开小差去啦~",
					})
				}
			  })
						  
			},
			//审核流程
			flowData(e){
			  let that=this										
			  sun.request({
				url: "/h5/order.confirm/getConfirmStep",
				showLoading: true,
				token:true,
				data:{
					id:e.id
				},
				success(res) {				
					if(res.code==200){						
					  that.confirmList = res.data.confirmList;
					  that.isEdit = res.data.isEdit;
					}
				},
				fail(e) {
					uni.showToast({
						icon: "none",
						title: "服务器开小差去啦~",
					})
				}
			  })
						  
			},
			//右侧修改
			editTextFn(e){		
				
				uni.navigateTo({
					url:"../../orderEdit/orderEdit?data="+JSON.stringify(e)
				})
			},
			
			//预览图片
			previewImg(e){
				// 预览图片
				uni.previewImage({
					current:e.index,
					urls: e.list,
					longPressActions: {
						// itemList: ['发送给朋友', '保存图片', '收藏'],
						success: function(data) {
							
						},
						fail: function(err) {
						}
					}
				});
			},
			//提交审核
			submit(){
				
			}
		}
	}
</script>

<style lang="less">
page{
	background: #F4F4F4;
	padding-bottom: 120upx;
}
.infoBox{
	width: 100%;
	height: auto;
	background: #FFFFFF;
	margin-top: 20upx;
}
.infoBox .title{
	background: #FFFFFF;
}
.info_box{
	width: 100%;
	height: auto;
	background: #FFFFFF;
	padding: 20upx 30upx 40upx 30upx;
	box-sizing: border-box;
	border-top:1upx solid #eeeeee;
	.name{
		width: 100%;
		height: 52upx;
		display: flex;
		align-items: center;
		font-size: 26upx;
		color: #666666;
	}
	.con{
		width: 100%;
		height: auto;
		display: flex;
		font-size: 26upx;
		justify-content: space-between;	
		align-items: flex-start;
		.txt1{
			width: auto;
			height: auto;
			line-height: 58upx;
			display: block;
			color: #999999;
		}
		.txt2{
			width: 400upx;
			height: auto;
			display: block;
			// line-height: 52upx;
			// word-wrap:normal ;
			// position: absolute;
			// right: 0;
			word-wrap : break-word;
			color: #666666;
		}
	}
	.remark{
			width: 100%;
			justify-content: space-between;
			align-items: flex-start;
			font-size: 26upx;
			margin-top: 20upx;
			.txt1{
				width: auto;
				display: block;
				color: #999999;
			}
			.txt2{
				width: 419upx;
				display: block;
				color: #666666;
				word-break: break-all;  /* break-all(允许在单词内换行。) */
			    text-overflow: ellipsis;  /* 超出部分省略号 */
				display: -webkit-box; /** 对象作为伸缩盒子模型显示 **/
				-webkit-box-orient: vertical; /** 设置或检索伸缩盒对象的子元素的排列方式 **/
				-webkit-line-clamp: 2; /** 显示的行数 **/
				overflow: hidden;
			}
		}
	
}
 


///审批流程
.approval{
	width: 100%;
	height: auto;
	text{
		width: 100%;
		height: 28upx;
		display: block;
		font-size:30upx;
		color: #999999;
		margin-bottom: 50upx;
		padding: 32upx 44upx 0 44upx;
		box-sizing: border-box;
	}
	}
.approver{
	width: 100%;
	height: auto;
	.box{
		width: 100%;
		height: 158upx;
		border-bottom: 1upx solid #eeeeee;
		box-sizing: border-box;
		padding: 0 32upx;
		position: relative;
		clear: both;
		.circle{
			width: 25upx;
			height: 25upx;
			background: #D3D3D3;
			border-radius: 50%;
			position: absolute;
			left: 30upx;
			top: 70upx;
		}
		.left{
			  width: 350upx;
			  min-height: 100upx;
			  white-space:normal ;
			  font-size: 32upx;
			  color: #333333;
			  margin-left: 57upx;
			  float: left;
			  
			  .view_text{
				  width: auto;
				  height: auto;
				  display: block;
				  font-size: 26upx;
				  color: #999999;
				  padding: 0;
				  word-break: break-all;
				  text-overflow: ellipsis;
				  display: -webkit-box; /** 将对象作为伸缩盒子模型显示 **/
				  -webkit-box-orient: vertical; /** 设置或检索伸缩盒对象的子元素的排列方式 **/
				  -webkit-line-clamp: 2; /** 显示的行数 **/
				  overflow: hidden;  /** 隐藏超出的内容 **/				  			
			  }
			}
		.right{
			width: auto;
			height: 110upx;
            float: right;
			padding-top: 30upx;
			margin-right:10upx ;
			display: flex;
			flex-direction: column;
			justify-content: center;
			align-items: center;			
			.image{
				width: 71upx;
				height: 71upx;
				background:#D3D3D3;
				border-radius: 50%;
			}
			text{
				
				height: auto;
				display: block;
                font-size: 26upx;
				color: #999999;
				padding: 0;
				text-align: center;
			}
		}
	}
}

.frist_circle{
	width: 25upx;
	height: 25upx;
	background: #D3D3D3;
	border-radius: 50%;
	position: absolute;
	left: 30upx;
	top: 70upx;
}
.circle::after{
	content: '';
	width: 2upx;
	height: 135upx;
	display: block;
	background: #D3D3D3;
	position: absolute;
	left: 50%;
	bottom: 25upx;
}



.add2pin{
	width: 80%;
	height: 80upx;
	margin: 50upx auto;
	background: #007AFF;
	border-radius: 30upx;
	color: #FFFFFF;
	line-height: 80upx;
	text-align: center;
	font-size: 28upx;
}


.image_list{
	width: 100%;
	display: flex;
	justify-content: left;
	flex-wrap: wrap;
	padding: 30upx;
	box-sizing: border-box;
	image{
		width: 150upx;
		height: 150upx;
		// background: #007AFF;
	}
}

.btn{
	width: 80%;
	
	font-size: 28upx;
	background: #007AFF;
	border-radius: 30upx;
	border: none;
	color: #FFFFFF;
	position: fixed;
	left: 50%;
	transform: translateX(-50%);
	bottom: 50upx;
}
</style>
